home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / SymantecStuff / SymantecCPlusPlusStuff.cp < prev   
Encoding:
Text File  |  1995-07-28  |  2.3 KB  |  97 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        SymantecCPlusPlusStuff.cp
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __BLJStandardIncludes__
  15. #include "BLJStandardIncludes.h"
  16. #endif
  17.  
  18. #ifndef __CONNECTIONS__
  19. #include <Connections.h>
  20. #endif
  21.  
  22. #ifndef __FILES__
  23. #include <Files.h>
  24. #endif
  25.  
  26. /***********************************|****************************************/
  27.  
  28. extern "C" {
  29.      void __pure_virtual_called ( void );
  30.     pascal OSErr PBGETALTACCESS (HParmBlkPtr paramBlock,Boolean async );
  31.     pascal OSErr PBSETALTACCESS (HParmBlkPtr paramBlock,Boolean async );
  32.     OSErr create ( char*, short x, unsigned long l1, unsigned long l2 );
  33.     pascal void CMGetErrorString(ConnHandle hConn,short id,Str255 errMsg);
  34.     pascal void C2PSTR ( char* cStr );
  35.     pascal void P2CSTR ( unsigned char* pStr );
  36. }
  37.  
  38.  
  39. /***********************************|****************************************/
  40.  
  41. #if 0
  42. void __pure_virtual_called ( void )
  43. {
  44.     DebugStr ("\p__pure_virtual_called");
  45. }
  46. #endif
  47.  
  48. /***********************************|****************************************/
  49.  
  50. #if 0
  51. pascal OSErr PBGETALTACCESS (HParmBlkPtr paramBlock,Boolean async )
  52. {
  53.     if ( async )
  54.         return PBGetAltAccessAsync ( paramBlock );
  55.     else
  56.         return PBGetAltAccessSync ( paramBlock );
  57. }
  58.  
  59. /***********************************|****************************************/
  60.  
  61. pascal OSErr PBSETALTACCESS (HParmBlkPtr paramBlock,Boolean async )
  62. {
  63.     if ( async )
  64.         return PBSetAltAccessAsync ( paramBlock );
  65.     else
  66.         return PBSetAltAccessSync ( paramBlock );
  67. }
  68. #endif
  69.  
  70. /***********************************|****************************************/
  71.  
  72. OSErr create ( char*, short x, unsigned long l1, unsigned long l2 )
  73. {
  74.     DebugStr ("\pcreate unexpectedly called.");
  75.     return -1;
  76. }
  77.  
  78. /***********************************|****************************************/
  79.  
  80. pascal void C2PSTR ( char* cStr )
  81. {
  82.     unsigned char len = strlen ( cStr );
  83.     BlockMove ( (Ptr) & cStr[0], (Ptr) & cStr[1], len );
  84.     (unsigned char) cStr[0] = len;
  85. }
  86.  
  87. /***********************************|****************************************/
  88.  
  89. pascal void P2CSTR ( unsigned char* pStr )
  90. {    
  91.     unsigned char len = pStr[0];
  92.     BlockMove ( & pStr[1], & pStr[0], len );
  93.     pStr[ len ] = 0;
  94. }
  95.  
  96. /***********************************|****************************************/
  97.